import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'TopNav',
    component: () => import('@/components/Recommend/top-nav.vue'),
    children: [
      { path: '/', name: 'Recommend', component: () => import('@/views/Recommend.vue') },
      { path: '/hot', name: 'Hot', component: () => import('@/views/Hot.vue') },
      {
        path: '/search',
        name: 'Search',
        component: () => import('@/views/Search.vue')
      },
      {
        path: '/my',
        name: 'My',
        component: () => import('@/views/my.vue')
      }

    ]
  },
  { path: '/detail/:singerID', name: 'SingerDetail', component: () => import('@/views/SingerDetail.vue'), props: true },
  { path: '/playlist/:palyListID', name: 'PlayList', component: () => import('@/views/PlayLIst.vue'), props: true },
  // {
  //   path: '/login',
  //   name: 'Login',
  //   component: () => import('@/views/Login.vue')
  // }
  {
    path: '/register',
    name: 'Register',
    component: () => import('@/views/Register.vue')
  },

  {
    path: '/mv',
    name: 'mv',
    meta: { isShow: true },
    component: () => import('@/views/MV/index.vue')
  }

]

const router = new VueRouter({
  routes
})

export default router
